<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>11_js原生oninput事件</title>
</head>
<!-- 
    oninput 事件在用户输入时触发,该事件在 <input> 或 <textarea> 元素的值发生改变时触发。
-->

<body>
    <input type="text" oninput="test(event)">
</body>
<script>
    function test(event) {
        console.log(event.target.value)
    }
</script>

</html>